import router from '@system.router';
import storage from '@system.storage';

export default {
    data: {
        time: 3
    },
    onInit() {
        this.start();
    },
    start() {
        var intervalID = setInterval(() => {
            if (this.time > 1) {
                this.time--;
            } else {
                clearInterval(intervalID);
                router.replace({
                    uri: 'pages/main/main'
                });
            }
        }, 1000);
    },
    jump() {
        router.replace({
            uri: 'pages/main/main'
        });
    }
}
